package org.micode.libs.dao.base;

import org.micode.common.domain.base.BaseEntity;
import org.micode.common.domain.base.BaseQuery;
import lombok.extern.slf4j.Slf4j;

/**
 * 服务类,基本方法
 */
@Slf4j
public abstract class BaseAllServiceImpl
        <KT, DTO extends BaseEntity<KT>, DO extends BaseEntity<KT>,
                QY extends BaseQuery<DO>, DAO extends BaseAllDao<DTO>>
        extends BaseEditServiceImpl<KT, DTO, DO, QY, DAO>
        implements BaseAllService<KT, DTO, QY> {

    public BaseAllServiceImpl() {
        super();
    }

    @Override
    public int updateForDelete(KT key, Long currentUserId, String clientAppName, String clientIpAddress) {
        return getMyDao().updateForDelete(key, currentUserId, clientAppName, clientIpAddress);
    }

    @Override
    public int updateForDeleteByKeys(String keys, Long currentUserId, String clientAppName, String clientIpAddress) {
        return getMyDao().updateForDeleteByKeys(keys, currentUserId, clientAppName, clientIpAddress);
    }

    @Override
    public int updateForDeleteByExample(DTO example, Long currentUserId, String clientAppName, String clientIpAddress) {
        return getMyDao().updateForDeleteByExample(example, currentUserId, clientAppName, clientIpAddress);
    }

}
